<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


	<ui:define name="sidebar">
	<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
	   <h:panelGroup style="width:100%;text-align:left;">
		 <h:outputText value="Create project perdiem expenses" styleClass="outputTextTitle"/>
		</h:panelGroup>
		<h:form> 
	    <p:growl id="growl"></p:growl>    
	    
	   
		
		<br />
	    
	          <h:outputLabel value="Employee Details"
						styleClass="outputTextSubTitle" />
              <h:panelGrid columns="9" 
						columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned"
						style="width: 100%; background-color: #FFE4C4; border: 1px solid #F5AD66;">
				
				        <h:outputLabel value="Perdiem Request ID" />
						<h:outputLabel value=":" />
						<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.projectPerdiemCode}" styleClass="wamOutputLebel" style="font-weight: bold; color: #7892B7"/>
						
						<h:outputLabel value="Requested Date"/>
					    <h:outputText value=":" />
					    <h:outputLabel value="#{createProjectPerdiemBean.requestDate}"  readonly="true">
					    <f:convertDateTime pattern="dd/MM/yyyy"/>
					    </h:outputLabel> 

						
						<h:outputLabel value="#{msg['employeename.label']}" />
						<h:outputLabel value=":" />						
						<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.employee.firstName} #{createProjectPerdiemBean.projectPerdiem.employee.lastName}"
							styleClass="wamOutputLebel" />

						<h:outputLabel value="#{msg['employeeid.label']}" />
						<h:outputLabel value=":" />
						<h:outputLabel
							value="#{createProjectPerdiemBean.projectPerdiem.employee.employeeCode}"
							styleClass="wamOutputLebel" />

					
					<h:outputLabel value="#{msg['contactnumber.label']}"/>
                    <h:outputText value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.employee.telephone}" readonly="true" />
					
					<h:outputLabel value="#{msg['emergenceycontactnum.label']}"/>
					<h:outputText value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.employee.telephone}" />
					
					<h:outputLabel value="#{msg['dept.label']}" />
				    <h:outputLabel value=":" />
				    <h:outputLabel  styleClass="wamOutputLebel" value="#{createProjectPerdiemBean.projectPerdiem.employee.moduleName}"/>
				    <h:outputLabel value="#{msg['designation.label']}" />
				    <h:outputLabel value=":" />
				    <h:outputLabel  styleClass="wamOutputLebel" value="#{createProjectPerdiemBean.projectPerdiem.employee.designation}"/>
					
					<h:outputLabel value="#{msg['recommendedby.lable']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.employeeAndReporting.projectManager.firstName}" readonly="true" />	
					<h:outputLabel value="#{msg['approvedby.lable']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.vicePresident.firstName} #{createProjectPerdiemBean.vicePresident.lastName}" readonly="true" />
					
				
				</h:panelGrid>
				<p:spacer />
				<br/>
		      <h:outputLabel value="Project Assignment Details"
						styleClass="outputTextSubTitle"/>
		    
	          <h:panelGrid columns="9" 
						columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned"
						style="width: 100%; background-color: #FFE4C4; border: 1px solid #F5AD66;">
				
			
					<h:outputLabel value="#{msg['projectname.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.projectAssignment.project.projectName}" readonly="true" />					 	
					<h:outputLabel value="#{msg['clientaddress.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.projectAssignment.project.clientAddress}" readonly="true" />		
					
					
					
					<h:outputLabel value="#{msg['clientname.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectAssignment.project.client}" readonly="true"/>
					<h:outputLabel value="#{msg['clientlocation.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.projectAssignment.project.clientLocation}" readonly="true"/>
					
										
					<h:outputLabel value="#{msg['clientcontactperson.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectAssignment.project.contactPerson}" readonly="true" />
					<h:outputLabel value="#{msg['clientcontactnumber.lable']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.projectAssignment.project.contactNumber}" readonly="true" />
					
					<h:outputLabel value="#{msg['projectstratdate.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.projectAssignment.project.periodFrom}" readonly="true" >
					 <f:convertDateTime pattern="dd/MM/yyyy"/>
					</h:outputLabel>
					<h:outputLabel value="#{msg['projectenddate.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{createProjectPerdiemBean.projectPerdiem.projectAssignment.project.periodTo}" readonly="true" >
					 <f:convertDateTime pattern="dd/MM/yyyy"/>
					</h:outputLabel>
									
					
				
				</h:panelGrid>
				<p:spacer />
				<br/>
		     <h:outputLabel value="Allowance Details"
						styleClass="outputTextSubTitle"/>
		    
		  
	         <h:panelGrid columns="3" 
						columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned"
						style="">
				
			
				    <h:outputLabel value="#{msg['dailyallowance.lable']}"/>
					<h:outputLabel value="#{createProjectPerdiemBean.projectAssignmentDetail.dailyAllowance}" readonly="true" >
					 
					</h:outputLabel>
					<h:outputLabel value="INR"/>
					
					<h:outputLabel value="#{msg['advanceamounttaken.lable']}"/>
					<h:outputLabel value="#{createProjectPerdiemBean.projectAssignmentDetail.advanceAmount}" readonly="true" />
					<h:outputLabel value="INR"/>
					<h:outputLabel value="#{msg['roomrentadvance.lable']}"/>
					<h:outputLabel value="#{createProjectPerdiemBean.projectAssignmentDetail.roomRentAdvance}" readonly="true" />
					<h:outputLabel value="INR"/>
					<h:outputLabel value="#{msg['roomrentpermonth.lable']}"/>
					<h:outputLabel value="#{createProjectPerdiemBean.projectAssignmentDetail.roomRentPerMonth}" readonly="true" />
					<h:outputLabel value="INR"/>		 

				
				</h:panelGrid>
			
				
				
				<!-- 
				<p:panel header="Previous Disbursement History" rendered="#{createProjectPerdiemBean.previousDisbursementSummary}" >
				<h:panelGrid columns="4" columnClasses="grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned,grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned">
					
					<h:outputLabel value="Discription"/>
					<h:outputLabel value="From Date"/>
					<h:outputLabel value="To Date"/>
					<h:outputLabel value="Amount"/>
					<h:outputLabel value="Room Rent"/>
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.roomRentFrom}"  readonly="#{createProjectPerdiemBean.readOnlyinput}" />
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.roomRentTo}"  readonly="#{createProjectPerdiemBean.readOnlyinput}" />
					<p:inputText value="#{createProjectPerdiemBean.projectPerdiemDetail.roomRentAmount}"  readonly="#{createProjectPerdiemBean.readOnlyinput}" >
					
					</p:inputText>
					<h:outputLabel value="Per Diems"/>
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.perdiemFrom}"  readonly="#{createProjectPerdiemBean.readOnlyinput}" />
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.perdeimTo}"  readonly="#{createProjectPerdiemBean.readOnlyinput}" />
					<p:inputText value="#{createProjectPerdiemBean.projectPerdiemDetail.perdeimAmount}" readonly="#{createProjectPerdiemBean.readOnlyinput}" >
					
					</p:inputText>
					<h:outputLabel value="Miscellaneous"/>
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.miscFrom}"  readonly="#{createProjectPerdiemBean.readOnlyinput}" />
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.miscTo}" readonly="#{createProjectPerdiemBean.readOnlyinput}"  />
					<p:inputText value="#{createProjectPerdiemBean.projectPerdiemDetail.miscAmount}" readonly="#{createProjectPerdiemBean.readOnlyinput}" >
					
					</p:inputText>
					<h:outputLabel value="Miscellaneous Remarks"/>
					<h:outputLabel value="Miscellaneous"/>
				    <h:inputHidden value=""  />
					<h:inputHidden value=""  />
					 <h:inputHidden value="" />
					<h:inputHidden value="" />
					<h:outputLabel value="Total Amount" style="float:right;"/>
					<p:inputText value="#{createProjectPerdiemBean.totalAmount}" />
					
					
				</h:panelGrid>
				</p:panel>
				 -->
				 <p:spacer />
				 <br/>
				 <h:outputLabel value="Perdiem Details"
						styleClass="outputTextSubTitle" />
				 
				<h:panelGrid columns="5" 
						columnClasses="grid96pxCellMiddleLeftAligned, gridCellMiddleLeftAligned, gridCellMiddleLeftAligned, grid96pxCellMiddleLeftAligned, gridCellMiddleLeftAligned, gridCellMiddleLeftAligned, grid96pxCellMiddleLeftAligned, gridCellMiddleLeftAligned, gridCellMiddleLeftAligned "
						style="width: 100%">  
					<h:outputLabel value="Discription" style="font-style:bold;"/>
					<h:outputLabel value="From Date"/>
					<h:outputLabel value="To Date"/>
					<h:outputLabel value="Amount"/>
					<h:inputHidden  />
					
					<h:outputLabel value="Room Rent"/>
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.roomRentFrom}"  />
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.roomRentTo}"  />
					<p:inputMask mask="999999" maxlength="5" value="#{createProjectPerdiemBean.projectPerdiemDetail.roomRentAmount}">
					 <p:ajax event="change" listener="#{createProjectPerdiemBean.totalAmountByRoomRentOnChange}" update="totalAmount"></p:ajax>
					</p:inputMask>
					<h:inputHidden  />
					
					<h:outputLabel value="Per Diems"/>
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.perdiemFrom}"  >
					
					</p:calendar>
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.perdeimTo}"  >
					
					</p:calendar>
					<p:inputText value="#{createProjectPerdiemBean.projectPerdiemDetail.perdeimAmount}" id="perdeimAmount" readonly="true">
					
					</p:inputText>
					<p:commandButton actionListener="#{createProjectPerdiemBean.calculatePerdiems}" update="perdeimAmount" value="Calculate Perdiems"></p:commandButton>
					
					<h:outputLabel value="Miscellaneous"/>
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.miscFrom}"  />
					<p:calendar value="#{createProjectPerdiemBean.projectPerdiemDetail.miscTo}"  />
					<p:inputText maxlength="5" value="#{createProjectPerdiemBean.projectPerdiemDetail.miscAmount}">
					 <p:ajax event="change" listener="#{createProjectPerdiemBean.totalAmountByMiscOnchange}" update="totalAmount"></p:ajax>
					</p:inputText>
					<h:inputHidden  />
					
					 <h:outputLabel value="Miscellaneous Remarks"/>
					 <p:inputTextarea cols="20" rows="3" value="#{createProjectPerdiemBean.projectPerdiemDetail.miscRemarks}"></p:inputTextarea>
					
				    <h:inputHidden />
					<h:inputHidden/>
					<h:inputHidden />
					
					
				
					
					<h:outputLabel value="Total Amount" style="float:left;"/>
					 <p:inputText  value="#{createProjectPerdiemBean.projectPerdiemDetail.totalAmount}" id="totalAmount" readonly="true"/>
					<h:inputHidden />
					<h:inputHidden/>
					<h:inputHidden />
					
				</h:panelGrid>
				
				<h:panelGroup style="float:right;margin-right:20px;">
					<p:commandButton value="Submit"  actionListener="#{createProjectPerdiemBean.saveProjectPerdiem}" update="@form"/>
					<p:commandButton value="Reset"  type="Reset" action="createprojectperdiem"/>
			    </h:panelGroup>
			
		
           
		
		</h:form>
	</ui:define>
</ui:composition>

